import axios from 'axios'
import { request } from '@/utils/request'

//首页 筑功者分页数据
    export function GetPageList(data) {
        const url = request.baseURL + '/api/wap/zgz/index';
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
   //--详情公共顶部
   export function GetDetail(id) {
    const url = request.baseURL + '/api/wap/m/detail';
    const data = {
        id:id,
        callback: 'callback'
    };
    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};

//详情页 
// 企业用户
//||---------------------
  //--详情主页
    export function GetCIndex(id) {
        const url = request.baseURL + '/api/wap/c/index';
        const data = {
            id:id,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
  //--基本信息
    export function GetAbout(id) {
        const url = request.baseURL + '/api/wap/c/about';
        const data = {
            id:id,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
     //--项目作品
        //--以往的项目
        export function GetLastProjects(id,pageIndex) {
            const url = request.baseURL + '/api/zgz/Company/Project';
            const data = {
                id:id,
                pageIndex:pageIndex,
                callback: 'callback'
            };
            return axios.get(url, {
                params: data
            }).then((res) => {
                return Promise.resolve(res.data);
            });
        };
        //--进行中的项目
        export function GetProjectings(id,pageIndex) {
            const url = request.baseURL + '/api/zgz/Company/Projecting';
            const data = {
                id:id,
                pageIndex:pageIndex,
                callback: 'callback'
            };
            return axios.get(url, {
                params: data
            }).then((res) => {
                return Promise.resolve(res.data);
            });
        };
  //设计团队
    export function GetTeams(id,pageIndex) {
        const url = request.baseURL + '/api/wap/c/team';
        const data = {
            id:id,
            pageIndex:pageIndex,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
  //合作伙伴
    export function GetPartner(id,pageIndex) {
        const url = request.baseURL + '/api/wap/c/partner';
        const data = {
            id:id,
            pageIndex:pageIndex,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
  //评价体系Comment
    export function GetComment(id,pageindex) {
        const url = request.baseURL + '/api/wap/m/comment';
        const data = {
            id:id,
            pageindex:pageindex,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
//-------------------- ||

//个人用户
//||--------------------
export function GetPerIndex(id) {
    const url = request.baseURL + '/api/wap/m/Index';
    const data = {
        id:id,
        callback: 'callback'
    };
    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};
    //--基本信息
    export function GetPerInfo(id) {
        const url = request.baseURL + '/api/wap/m/Info';
        const data = {
            id:id,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
 //--项目作品
    //--以往的项目
    export function GetProjects(id,pageIndex) {
        const url = request.baseURL + '/api/wap/m/projects';
        const data = {
            id:id,
            pageIndex:pageIndex,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
  
 //--个人证书
    export function GetCertificate(id) {
        const url = request.baseURL + '/api/wap/m/certificate';
        const data = {
            id:id,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
 //--评价体系Comment
    export function GetPerComment(id) {
        const url = request.baseURL + '/api/wap/m/comment';
        const data = {
            id:id,
            callback: 'callback'
        };
        return axios.get(url, {
            params: data
        }).then((res) => {
            return Promise.resolve(res.data);
        });
    };
//---------------------||

